<?php
	$min_rating = 0;
	$cmess = "Скрытый комментарий, раскрыть?";
	$crating = db_fetch_object(db_query("SELECT `value` FROM {votingapi_cache} WHERE `content_type` = 'comment' AND content_id = %d AND `function` = 'sum' LIMIT 0,1", $comment->cid));
	if($crating->value < $min_rating)print	"<div id=\"comment-open-" . $comment->cid . "\"><a href=\"javascript:{}\" onclick=\"document.getElementById('hidden-comment-" . $comment->cid. "').style.display=''; document.getElementById('comment-open-" . $comment->cid. "').style.display='none';\">" . $cmess . "</a></div><div id=\"hidden-comment-" . $comment->cid . "\" style=\"display: none;\">";
?>
<div class="comment<?php if ($comment->status == COMMENT_NOT_PUBLISHED) print ' comment-unpublished'; ?>">
<?php if ($new != '') { ?><span class="new"><?php print $new; ?></span><?php } ?>

<?php 
	$comment_path = base_path() . drupal_get_path_alias("node/" . $comment->nid) . "#comment-" . $comment->cid;		
?>

<?php if ($picture) print $picture; ?>
    <div class="submitted"><?php print theme('username', $comment) . format_date($comment->timestamp, 'custom', ' d.m.Y в H:i')  . " <a href=\"" . $comment_path . "\" title=\"Ссылка на этот комментарий\">сказал</a>:"; ?> </div>
    <div class="content"><?php print $content; ?></div>
    <div class="links"><?php print $links; ?></div>
</div>

<?php
	if($crating->value < $min_rating)print	"</div>";
?>
